include_directories(
    ${JSON_INCLUDE_DIR}
    ${CMAKE_SOURCE_DIR}/include
)

message(STATUS "JSON_INCLUDE_DIR: ${JSON_INCLUDE_DIR}")

link_directories(
    ${UNILIB_LIBRARY_DIR}
)

add_library(pa_core SHARED
    ${CMAKE_CURRENT_SOURCE_DIR}/model/qwen2_hub.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/vocab/vocab.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tokenizer/qwen2_tokenizer.cpp
    ${CMAKE_CURRENT_SOURCE_DIR}/tokenizer/unicode.cpp
)

target_link_libraries(pa_core PRIVATE
    unilib
)

install(TARGETS pa_core
    LIBRARY DESTINATION lib)